Component({
  data: {
    selected: null,
    color: "#000000",
    selectedColor: "#FFAF00", 
    backgroundColor: "#ffffff",
    borderStyle: "black",
    list: [{
      pagePath: "/pages/index/index",
      iconPath: "/images/home.png",
      selectedIconPath: "/images/home_light.png",
      text: "首页"
    },
    {
      pagePath: "/pages/mine/mine",
      iconPath: "/images/my.png",
      selectedIconPath: "/images/my_light.png",
      text: "我的"
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      // console.log(data);
      const url = data.path
      // console.log(url);
      wx.switchTab({url})
      // this.setData({
      //   selected: data.index
      // })
    }
  }
})